package starlingTest 
{
	import flash.display.Bitmap;
	import starling.display.Image;
	import starling.display.Quad;
	import starling.display.Sprite;
	import starling.text.TextField;
	import starling.textures.Texture;
	import starling.textures.TextureAtlas;

	public class Game extends Sprite
	{
		[Embed(source="../../bin/texture/iscript.png")]
		private var IscriptImage:Class;
		
		private var q:Quad;   
		public function Game() 
		{
			var tf:TextField = new TextField (300, 200, "welcom to starling");
			addChild (tf);
			
			q = new Quad(200, 200);   
			/*q.setVertexColor(0, 0x000000);   
			q.setVertexColor(1, 0xAA0000);   
			q.setVertexColor(2, 0x00FF00);   
			q.setVertexColor(3, 0x0000FF);  */
			q.setVertexColor(0, 0xFF8000);   
			q.setVertexColor(1, 0xFF8000);   
			q.setVertexColor(2, 0x00FF00);   
			q.setVertexColor(3, 0x00FF00);  
			//addChild ( q );   
			
			
			var bm:Bitmap = new IscriptImage ();
			var texture:Texture = Texture.fromBitmap (bm);
			//var texture:Texture = Texture.fromBitmap(sausageBitmap); 
			
			//var a:TextureAtlas = new TextureAtlas(
			
			var image:Image = new Image (texture);
			    image.x = 200;
				image.y = 100;
			    addChild (image);
		}
		
	}

}